import 'package:flutter/material.dart';

import 'package:get/get.dart';

import '../controllers/my_patient_controller.dart';

class MyPatientView extends GetView<MyPatientController> {
  const MyPatientView({super.key});
  @override
  Widget build(BuildContext context) {
    print(controller.count);
    return Scaffold(
      appBar: _appBar,
      drawer: _drawer,
      body: _body,
    );
  }

  get _appBar => AppBar(
        toolbarHeight: 40,
        title: const Text('我的病人'),
        centerTitle: true,
      );

  get _body => Container(
        decoration: const BoxDecoration(color: Colors.white),
        child: Center(
          child: Column(
            children: [
              // SizedBox(height: 50),
              Text('hello'),
              _spo2Info(120, 50, 100),
            ],
          ),
        ),
      );
  get _drawer => Drawer(
        child: ListView(
          // Important: Remove any padding from the ListView.
          padding: EdgeInsets.zero,
          children: [
            DrawerHeader(
              decoration: const BoxDecoration(
                color: Colors.blue,
              ),
              child: Text('settings'.tr),
            ),
            ListTile(
              title: Text("demo_mode".tr),
              onTap: () {},
            ),
            ListTile(
              title: Row(
                mainAxisSize: MainAxisSize.min,
                children: [
                  Text('select_language'.tr),
                ],
              ),
              onTap: () {},
            ),
          ],
        ),
      );

  Widget _spo2Info(int high, int low, int current) {
    return Container();
  }
}
